package com.ysd.shopcar.service;

import com.ysd.shopcar.common.JSONResult;
import com.ysd.shopcar.param.in.AddProductToCarRequestType;
import com.ysd.shopcar.param.in.ChangeProductNumRequestType;
import com.ysd.shopcar.param.in.SubmitOrderRequestType;
import com.ysd.shopcar.param.out.CarProdcutListResponseType;
import com.ysd.shopcar.param.out.SubmitOrderResponseType;

public interface ShopCarService {
	/**
	 * 修改购物车中产品的数量
	 * @param request
	 * @return
	 */
	JSONResult<ChangeProductNumRequestType> changeProductNumByUIDAndPID(ChangeProductNumRequestType request);

	/**
	 * 根据uid查询购物车商品信息
	 * @param uid
	 * @return
	 */
	JSONResult<CarProdcutListResponseType> getCatProductsByUID(Long uid);

	/**
	 * 将商品加入购物车
	 * @param request
	 * @return
	 */
	JSONResult<Object> addProductToShopCar(AddProductToCarRequestType request);

	/**
	 * 提交订单接口
	 * @param request
	 * @return
	 */
	JSONResult<SubmitOrderResponseType> submitOrder(SubmitOrderRequestType request);

	/**
	 * 秒杀下单接口
	 * @param request
	 * @return
	 */
	JSONResult submitMsOrder(AddProductToCarRequestType request);

}
